package com.fz.us.admin.company.entity;

import com.fz.us.admin.base.entity.parent.NameEntity;

import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

/**
 * 实体类 - 公司 基类
 * ============================================================================
 * 版权所有 2016 。
 *
 * @author fallenpanda
 * @version 1.0 2016-08-02 。
 * ============================================================================
 */
@MappedSuperclass
public class CompanyEntity extends NameEntity {

    private static final long serialVersionUID = -8229611986496409583L;
    /**
     * 创建人
     */
    protected User creater;
    /**
     * 所属企业
     */
    protected Company company;

    @ManyToOne(fetch = FetchType.LAZY)
    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public User getCreater() {
        return creater;
    }

    public void setCreater(User creater) {
        this.creater = creater;
    }
}
